


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        textarea{
            display: block;
            margin: 30px auto;
            height: 300px;
            width: 600px;
            padding: 10px;
        }
    </style>
</head>
<body>

    <!-- <div v-if="a">
    </div>
    <p v-else></p> -->
    <textarea id="textarea">
        <div>
            1
        </div>
    </textarea>

    <!-- [div,p,] -->
    
   <button id="parse">解析</button>

   <script src="../parse/process.js"></script>
   <script src="../parse/common.js"></script>
   <script src="../parse/index.js"></script>
    <script src="./static.js"></script>
    <script src="./generate.js"></script>

    <script>

        document.getElementById("parse").onclick=function(){
            var html = document.getElementById("textarea").value
            var ast = parse(html,{
                expectHTML: true,
            })
            optimize(ast,{})
            console.log("ast",ast)
        }
    </script>
    <!-- var render = generate(ast,{}) -->
            <!-- console.log("render",render) -->
    
</body>
</html>